import * as z from "zod";

// Schema for creating a user
export const userCreateSchema = z.object({
  username: z.string().min(1, "用户名不能为空"),
  email: z.string().email("邮箱格式不正确").min(1, "邮箱不能为空"),
  role: z.enum(["admin", "user"], { message: "请选择有效的角色" }),
});

// Infer the TypeScript type from the schema
export type UserCreateInput = z.output<typeof userCreateSchema>;
